fix(openapi): Update OpenAPI schemas to match API behaviour#2291
Merged
fix(openapi): Update OpenAPI schemas to match API behaviour#2291
Conversation
These changes align the OpenAPI specs with the Pydantic models generated for apify-client-python (PR apify/apify-client-python#650), so that `datamodel-codegen` produces matching output without manual edits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merged
1 task
|
Preview for this PR was built for commit |
Remove read-only fields from the request example that were removed from the UpdateTaskRequest schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fnesveda
approved these changes
Feb 27, 2026
Member
fnesveda
left a comment
There was a problem hiding this comment.
Thanks for cleaning this up!
Pijukatel
approved these changes
Feb 27, 2026
Closed
9 tasks
vdusek
added a commit
to apify/apify-client-python
that referenced
this pull request
Feb 27, 2026
…650) ## Summary - Replace hand-written `_representations.py` helper functions (302 lines deleted) with Pydantic request models (`UpdateActorRequest`, `ScheduleCreate`, `WebhookCreate`, `WebhookUpdate`, etc.) for constructing API payloads. - Simplify `_update()` / `_create()` in `ResourceClient` to accept `**kwargs` and use a new `_clean_json_payload()` static method on `ResourceClientBase` instead of the removed `filter_none_values()` utility. - Remove unused `enum_to_value()` and `filter_none_values()` from `_utils.py` — Pydantic serialization handles enum conversion and `None` filtering. - Add `populate_by_name=True` to all generated Pydantic model configs via `datamodel-codegen` configuration, so models can be initialized using either `snake_case` field names or `camelCase` aliases. - Models had to be adjusted, see PR to apify-docs - apify/apify-docs#2291. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ActorStandbyschema, missing fields (actorStandby,exampleRunInput,isDeprecated,title,maxItems,forcePermissionLevel), and removes incorrectrequiredconstraints from request schemas.UpdateTaskRequestto only contain mutable fields (removes read-only fields likeid,userId,createdAt, etc.).Related PRs
Test plan
datamodel-codegenagainst the bundled spec🤖 Generated with Claude Code